using System;
using Whitemice.MOGI;

namespace Whitemice.MOGI.ZOGI
{	
	public abstract class Company : Whitemice.MOGI.ZOGI.OwnedDocument, ICompany
	{
		public Company(IServer server, Payload payload) 
			: base(server, payload)
		{
		}
		
		public bool HasAddressType(string addressType)
		{
			return payload.HasAddressValue(addressType);
		}
		
		public IAddress Address(string addressType)
		{
			return (IAddress)payload.AddressValue(addressType);
		}
		
		
		public bool HasPhoneType(string phoneType)
		{
			return payload.HasPhoneValue(phoneType);
		}
		
		public IPhoneNumber PhoneNumber(string phoneType)
		{
			return (IPhoneNumber)payload.PhoneValue(phoneType);
		}
		
		public Array Categories 
		{ 
			get { return null; }
			set { } 
		}
		
		public string Comment 
		{ 
			get { return payload.GetStringForKey("comment"); }
			set { payload.SetValueForKey("comment", value); }
		}
	}
}
